package com.quartz;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.text.SimpleDateFormat;
import java.util.Date;

public class QuartzJob extends QuartzJobBean {
	@Override
	protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
		String orderNo = context.getJobDetail().getJobDataMap().get("orderNo").toString();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH");
		System.out.println("QuartzJob2----orderNo" + orderNo + sdf.format(new Date()));
	}
}
